<?php

class WebUser extends CWebUser
{
	public function getIsAdmin()
	{
		return (int)$this->id===1;
	}

	public function getNameString()
	{
		$name=$this->name;
		$parts=explode('.',$name);
		if(count($parts)>1)
		{
			foreach($parts as &$part)
				$part=ucfirst($part);

			return $parts[0].' '.$parts[1];
		}
		else
			return ucfirst($name);
	}
}
